import request from '@/utils/request'

// 查询分区列表
export function listForum(query) {
  return request({
    url: '/bbs/forum/list',
    method: 'get',
    params: query
  })
}

// 查询分区详细
export function getForum(fid) {
  return request({
    url: '/bbs/forum/' + fid,
    method: 'get'
  })
}

// 新增分区
export function addForum(data) {
  return request({
    url: '/bbs/forum',
    method: 'post',
    data: data
  })
}

// 修改分区
export function updateForum(data) {
  return request({
    url: '/bbs/forum',
    method: 'put',
    data: data
  })
}

// 删除分区
export function delForum(fid) {
  return request({
    url: '/bbs/forum/' + fid,
    method: 'delete'
  })
}
